#pragma once

#include <SDL.h>

struct Player
{
    SDL_Texture *ptexture_ = nullptr;       ///< 纹理
    SDL_FPoint position_ = {0, 0};          ///< 位置
    int width_ = 0;                         ///< 宽度
    int height_ = 0;                        ///< 高度     
    int speed_ = 200;                       ///< 速度
    int cool_down_ = 500;                   ///< 冷却
    int last_shot_time_ = 0;                ///< 上次射击时间
    int hp_ = 3;                            ///< 生命值
    bool is_dealt_ = false;                
};


struct ProjectilePlayer
{
    SDL_Texture *ptexture_ = nullptr;       ///< 纹理
    SDL_FPoint position_ = {0, 0};          ///< 位置
    int direction_ = 0;                    ///< 方向
    int width_ = 0;                         ///< 宽度
    int height_ = 0;                        ///< 高度
    int speed_ = 400;                         ///< 速度
    int damage_ = 1;                         ///< 伤害
};




struct Enemy
{
    SDL_Texture *ptexture_ = nullptr;       ///< 纹理
    SDL_FPoint position_ = {0, 0};          ///< 位置
    int width_ = 0;                         ///< 宽度
    int height_ = 0;                        ///< 高度
    int speed_ = 200;                       ///< 速度
    int cool_down_ = 2000;                  ///< 冷却
    int last_shot_time_ = 0;                ///< 上次射击时间
    int hp_ = 2;                            ///< 生命值
};

struct ProjectileEnemy
{
    SDL_Texture *ptexture_ = nullptr;       ///< 纹理
    SDL_FPoint position_ = {0, 0};          ///< 位置
    SDL_FPoint direction_ = {0, 0};          ///< 方向
    int width_ = 0;                         ///< 宽度
    int height_ = 0;                        ///< 高度
    int speed_ = 400;                         ///< 速度
    int damage_ = 1;                         ///< 伤害
};


struct Explosion
{
    SDL_Texture *ptexture_ = nullptr;       ///< 纹理
    SDL_FPoint position_ = {0, 0};          ///< 位置
    int width_ = 0;                         ///< 宽度
    int height_ = 0;                        ///< 高度
    int current_frame_ = 0;                 /// current frame
    int total_frames_ = 0;                  /// total frames
    int FPS_ = 5;                           /// frames per second
    int start_time_ = 0;                      /// start time
};